File preparation

Overview

When developing a script type extension, create a development folder in any location and prepare the following files.

  • Required files
    • Manifest file (manifest.json) ・・・ Extension definition
    • Script file ・・・ C# script file which is the entry point
    • Locale file (locale.*.json) ・・・ Definitions for each localized language (required only for multilingual support)

For example, when developing an extension named helloworld using the script method, the basic file structure is as follows.

    helloworld/
        manifest.json
        main.cs
        locale.en.json (for multilingual support)
        locale.ja.json (for multilingual support)
        resources/
            button.png

Manifest file

  • Every Next Design extension must have one file named manifest.json. This is called a manifest.
  • This manifest has the following definitions.
    • Extension overview
    • File name as entry point
    • life cycle
    • Extension points for UI, events, and commands
  • Use UTF-8 as the character code of the manifest file.
  • Prepare the icon image on the ribbon specified in the manifest as a PNG format file.

manifest.json

{
    "name": "HelloWorld",
    "main": "main.cs",
    "lifecycle": "application",

    "extensionPoints": {
        ...
    }
}

Reference

Script file

  • Implement the handler called from the extension point defined in the manifest in the script file.
  • A file that implements a handler called from an extension point is called an entry point.
  • Only one entry point can be specified in the manifest. All handlers must be implemented in one entry point.

Detail

Locale file (optional)

  • If the extension supports multiple languages, define a locale file named locale.{lang}.json for each localized language.

Detail